from rest_framework import serializers
from book.models import Book
from rest_framework.viewsets import ModelViewSet


# 1.定义序列化器（转换，校验）
class BookSerializer(serializers.ModelSerializer):
    class Meta:
        model = Book
        fields = '__all__'



